<template>
  <div class="map-box">
    <div id="cesiumContainer"></div>
  </div>
</template>

<script>
import { TCesium } from './cesium';

export default {
  name: '',
  mounted() {
    // var viewer = new Cesium.CesiumWidget('cesiumContainer')
    // eslint-disable-next-line no-undef
    // var viewer = new Cesium.Viewer("cesiumContainer");
    // // eslint-disable-next-line no-console
    // console.log(viewer)
    this.init()
  },
  methods: {
    init() {
      this.mapObject = new TCesium('cesiumContainer'); // 注意，这个my-map就是我们div的id
    }
  }
};
</script> 
<style scoped>
.map-box {
  width: calc(100vw -20px);
  height: calc(100vh - 120px);
}
#cesiumContainer {
  width: 100%;
  height: 100%;
}
</style>
